# -*- coding = utf-8 -*-
# @Time : 2021/10/8 10:45
# @Author : 龙王赘婿_彪少
# @File : testsys.py
# @Software: PyCharm
# 多敲代码总归是好的

import sys

for index, arg in enumerate(sys.argv):
    print("第%d个参数是： %s" % (index, arg))

'''
enumerate 函数
>>>seasons = ['Spring', 'Summer', 'Fall', 'Winter']
>>> list(enumerate(seasons))
[(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')]
>>> list(enumerate(seasons, start=1))       # 下标从 1 开始
[(1, 'Spring'), (2, 'Summer'), (3, 'Fall'), (4, 'Winter')]

格式化输出
>>>str = "the length of (%s) is %d" %('runoob',len('runoob'))
>>> print(str)
the length of (runoob) is 6
'''
